<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>示例15</title>
    <script>
        const map = new Map([
            ['color', 'red'],
            ['size', '14px'],
        ]);
        for (let key of map.keys()) {
            console.log(key); // "color" "size" 
        }
        for (let value of map.values()) {
            console.log(value); // "red" "14px" 
        }
        for (let item of map.entries()) {
            console.log(item[0], item[1]); // "color" "red" "size" "14px" 
        }
    </script>
</head>

<body></body>

</html>